import java.util.Stack;

public class Text {

    public static void main(String[] args) {
        MyStackUseQueue myStack = new MyStackUseQueue();

        myStack.push(1);
        myStack.push(2);

        System.out.println(myStack.top());;
        System.out.println(myStack.pop());;

        Stack<Integer> stack = new Stack<>();
    }

    public static void main1(String[] args) {
        MyQueue myQueue = new MyQueue();

        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        myQueue.offer(4);
        myQueue.offer(5);

        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());

        System.out.println(myQueue.peek());
    }
}
